<ng-template #inputTemplate>
  <input
    #inputElement
    autocomplete="something-new"
    class="ant-select-search__field"
    (compositionstart)="isComposing = true"
    (compositionend)="isComposing = false"
    (input)="updateWidth()"
    (keydown)="onKeyDownInput($event)"
    [ngModel]="inputValue"
    (ngModelChange)="setInputValue($event,true)"
    [disabled]="nzDisabled">
</ng-template>
<div
  *ngIf="nzPlaceHolder"
  nz-select-unselectable
  [style.display]="placeHolderDisplay"
  (click)="focusOnInput()"
  class="ant-select-selection__placeholder">{{ nzPlaceHolder }}</div>
<!--single mode-->
<ng-container *ngIf="isSingleMode">
  <!--selected label-->
  <div
    *ngIf="nzListOfSelectedValue.length"
    class="ant-select-selection-selected-value"
    [attr.title]="nzListOfSelectedValue[0].nzLabel"
    [ngStyle]="selectedValueDisplay">
    {{ singleValueLabel }}
  </div>
  <!--show search-->
  <div
    *ngIf="nzShowSearch"
    class="ant-select-search ant-select-search--inline">
    <div class="ant-select-search__field__wrap">
      <ng-template [ngTemplateOutlet]="inputTemplate"></ng-template>
      <span class="ant-select-search__field__mirror">{{inputValue}}&nbsp;</span>
    </div>
  </div>
</ng-container>
<!--multiple or tags mode-->
<ul *ngIf="isMultipleOrTags">
  <ng-container *ngFor="let value of nzListOfSelectedValue">
    <li
      *ngIf="isOptionDisplay(value)"
      [@tagAnimation]
      [attr.title]="getPropertyFromValue(value,'nzLabel')"
      [class.ant-select-selection__choice__disabled]="getPropertyFromValue(value,'nzDisabled')"
      class="ant-select-selection__choice">
      <div class="ant-select-selection__choice__content">{{ getPropertyFromValue(value, 'nzLabel') || value }}</div>
      <span *ngIf="!getPropertyFromValue(value,'nzDisabled')" class="ant-select-selection__choice__remove" (click)="removeValueFormSelected(value)"></span>
    </li>
  </ng-container>

  <li class="ant-select-search ant-select-search--inline">
    <ng-template [ngTemplateOutlet]="inputTemplate"></ng-template>
  </li>
</ul>